import QtQuick 2.0
import QtQuick.Controls 1.3
Rectangle {
    id: root
    width: 300
    height: 130
    color: app.getSystemThemeColor()

    APPCloseMenu{
        anchors.top: parent.top
        anchors.right: parent.right
        anchors.topMargin: 7
        anchors.rightMargin: 12
        onClose:{
            root.visible = false
            app.slotShowHistoryImage("无")
        }
    }

    Text{
        id: title
        width: parent.width
        height: 30
        text: "历史影像"
        color: "#FFFFFF"
        font.pixelSize: 20
        anchors.top: parent.top
        anchors.topMargin: 20
        horizontalAlignment : Text.AlignHCenter
        font.family: "黑体"
    }
    Rectangle{
        id: separator
        width: parent.width
        height: 1
        color: "#FFF"
        anchors.top: title.bottom
    }

    Item{
        id: timeChoose
        width: parent.width
        height: 40
        anchors.top: separator.bottom
        anchors.topMargin: 20
        Text{
            anchors.left: parent.left
            anchors.leftMargin: 15
            color: "#FFF"
            text: "时间"
            font.family: "黑体"
            font.pixelSize: 16
            anchors.verticalCenter: parent.verticalCenter
        }

        ComboBox{
            anchors.left: parent.left
            anchors.leftMargin: 80
            anchors.verticalCenter: parent.verticalCenter
            width: 200
            height: 25
            model: ListModel {
                id: cbItems
                ListElement {text: "无"}
                ListElement { text: "20100102"; }
                ListElement { text: "20101202"; }
                ListElement { text: "20140715"; }
                ListElement { text: "20150209"; }
                ListElement { text: "20170419"; }
                ListElement { text: "20171109"; }
            }
            onCurrentIndexChanged:{
                app.slotShowHistoryImage(cbItems.get(currentIndex).text)
                messageBox.message = cbItems.get(currentIndex).text
                messageBox.show()
            }
        }
    }

}

